home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_03_02
/
3n02050a
< prev
next >
Wrap
Text File
|
1991-09-16
|
423b
|
22 lines
// memory.c example 1
// cl /AL /Lp memory.c
// bind286 memory
// memory
#include <stdlib.h>
#include <stdio.h>
main()
{
int i = 0;
printf("Allocating memory...\n");
while(1)
if (malloc((unsigned)65512))
printf("Allocated 64K: %d blocks\n",++i);
else
break;
printf("Ran out of available memory\n\n");
printf("Allocated %dK total.\n",i*64);
}